<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>ClosePath</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">ClosePath()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#3A3966"><b>ClosePath</b></font>()</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Closes the current figure in the vector drawing path by adding a straight line to the starting 
point of the figure. The starting point is the location of the last <a href="movepathcursor.html">MovePathCursor()</a> call. 
When a path is <a href="fillpath.html">filled</a>, only closed figures are taken into account. 

 

</blockquote><p><b>参数</b></p><blockquote>
无.

</blockquote><p><b>返回值</b></p><blockquote>
无.


</blockquote><p><b>示例</b></p><blockquote>


<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 400, 200, "VectorDrawing", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    CanvasGadget</font>(0, 0, 0, 400, 200)

    <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartVectorDrawing</font>(<font color="#3A3966">CanvasVectorOutput</font>(0))
    
      <font color="#3A3966">; Create a path with two closed triangles</font>
<font color="#3A3966">      MovePathCursor</font>(20, 160)
<font color="#3A3966">      AddPathLine</font>(100, 20)
<font color="#3A3966">      AddPathLine</font>(180, 160)
<font color="#3A3966">      ClosePath</font>()
      
<font color="#3A3966">      MovePathCursor</font>(220, 160)
<font color="#3A3966">      AddPathLine</font>(300, 20)
<font color="#3A3966">      AddPathLine</font>(380, 160)
<font color="#3A3966">      ClosePath</font>()

      <font color="#3A3966">; fill the path</font>
<font color="#3A3966">      VectorSourceColor</font>(<font color="#3A3966">RGBA</font>(0, 0, 255, 255))
<font color="#3A3966">      FillPath</font>()
    
<font color="#3A3966">      StopVectorDrawing</font>()
    <b><font color="#3A3966">EndIf</font></b>
    
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

<br>
<p><img src="../HelpPictures/closepath.png"></p>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="fillpath.html">FillPath()</a>, <a href="isinsidepath.html">IsInsidePath()</a>, <a href="movepathcursor.html">MovePathCursor()</a>, <a href="addpathline.html">AddPathLine()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=clippath.html>ClipPath()</a> - <a href="index.html">VectorDrawing Index</a> - <a href="convertcoordinatex.html">ConvertCoordinateX()</a> -&gt;<br><br>

</body></html>